﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevTeam;
using DevExpress.XtraEditors.Repository;

namespace Fatura
{
    public partial class Musteriler : XForm
    {
        public Musteriler()
        {
            InitializeComponent();
        }

        private void Musteriler_Load(object sender, EventArgs e)
        {
            gvMusteri.Init("FT_GetCustomer");

            gvMusteri.Columns["CustomerId"].ColumnEdit = new RepositoryItemTextEdit();
            gvMusteri.Columns["CustomerId"].OptionsColumn.AllowEdit = false;
            gvMusteri.Columns["CustomerId"].AppearanceCell.BackColor = System.Drawing.Color.LightYellow;
            
            gvMusteri.MakeColumnInvisible("Sirket");
            gvMusteri.SetCaptions("Name:Müşteri");

            bbiKaydet.ItemClick += bbiKaydet_ItemClick;

            gvMusteri.BestFitColumns();
        }

        void bbiKaydet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gvMusteri.Update("CustomerId,SirketId,Name", "FT_Customer");
        }
    }
}
